package com.zqh.app.manager.impl;

import com.zqh.app.dao.FeedbackMapper;
import com.zqh.app.entity.Feedback;
import com.zqh.app.manager.AppFeedbackManager;
import com.zqh.common.entity.Page;
import com.zqh.common.entity.Query;
import com.zqh.common.entity.R;
import com.zqh.common.utils.CommonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("AppFeedbackManager")
public class AppFeedbackManagerImpl implements AppFeedbackManager{

    @Autowired
    FeedbackMapper feedbackMapper;
    @Override
    public List<Feedback> getFeedbackList(Page<Feedback> page, Query form) {
        return feedbackMapper.listForPage(page, form);
    }

    @Override
    public R updateFeedbackInfo(Query search) {
        int count = feedbackMapper.update(search);
        return CommonUtils.msg(count);
    }
}
